import { createApp } from 'vue'

import Vant from "vant"
import "vant/lib/index.css"

import App from './App.vue'
import router from './router'
import service from './utils/request';



createApp(App).use(Vant).use(router).mount('#app')

// 设置全局的未授权处理函数
service.unauthorizedHandler = () => {
    localStorage.removeItem('token');
    router.push('/login');
};
